#！/bin/bash
#grep_string = "source /userdata/workdir/honymow_commands"
sed -i 's/\r//' honymow_commands
cp /userdata/workdir/honymow-Commands/honymow_commands /userdata/workdir/ && echo 'rosbag脚本已设置'
cp -rf /userdata/workdir/honymow-Commands/bag /userdata/workdir/ && echo '快捷命令已设置'
if grep -q "source /userdata/workdir/honymow_commands" ~/.bashrc; then
    echo 'bashrc中已存在配置指令'
else
    echo "source /userdata/workdir/honymow_commands" >> ~/.bashrc
    echo '配置文件已添加'
fi
source ~/.bashrc && echo '设置成功'
